package descriptor;

import java.io.Serializable;
import java.util.Vector;



public class StudentListDescriptor implements Serializable{
	
	private Vector<StudentDescriptor> studentList;
	
	public StudentListDescriptor(){
		studentList = new Vector<StudentDescriptor>();
	}
	
//	public StudentListDescriptor(Vector<StudentDescriptor> list){
//		studentList = new Vector<StudentDescriptor>(list);
//	}
	
	public void addStudent(StudentDescriptor studentDesc){
		studentList.add(studentDesc);
	}

	public Vector<StudentDescriptor> getStudentList() {
		return studentList;
	}
	
	public StudentDescriptor getStudent(int studentId){
		StudentDescriptor student = null;
		for(StudentDescriptor desc : studentList){
			if(desc.getId() == studentId){
				student = desc;
			}
		}
		return student;
	}
}
